
<div>

  <h1>
    渠道(<%= @channels.total_entries %>)
  </h1>
</div>

<div>
  <table class="table table-striped">
    <tr>
      <th>ID</th>
      <th>名称</th>
      <th>拥有品牌</th>
    </tr>

    <% @channels.each do |channel| %>
      <tr>
        <td><%= channel.id %></td>
        <td><%= channel.name %></td>
        <td>
          <% channel.brands.each do |brand| %>
            |_ <%= brand.title %>
            <br />
          <% end %>
        </td>
      </tr>
    <% end -%>
  </table>

  <%= will_paginate @channels %>
</div>


